Integrand size = 21, antiderivative size = 137 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^4 \, dx=-\frac {a^2 \left (a^2+6 b^2\right ) \cot (c+d x)}{d}-\frac {2 a^3 b \cot ^2(c+d x)}{d}-\frac {a^4 \cot ^3(c+d x)}{3 d}+\frac {4 a b \left (a^2+b^2\right ) \log (\tan (c+d x))}{d}+\frac {b^2 \left (6 a^2+b^2\right ) \tan (c+d x)}{d}+\frac {2 a b^3 \tan ^2(c+d x)}{d}+\frac {b^4 \tan ^3(c+d x)}{3 d} \]
-a^2*(a^2+6*b^2)*cot(d*x+c)/d-2*a^3*b*cot(d*x+c)^2/d-1/3*a^4*cot(d*x+c)^3/ d+4*a*b*(a^2+b^2)*ln(tan(d*x+c))/d+b^2*(6*a^2+b^2)*tan(d*x+c)/d+2*a*b^3*ta n(d*x+c)^2/d+1/3*b^4*tan(d*x+c)^3/d
Time = 5.98 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.37 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^4 \, dx=-\frac {(b+a \cot (c+d x))^4 \sin (c+d x) \left (\cos (c+d x) \left (-6 a b^3+6 a^3 b \cot ^2(c+d x)+a^4 \cot ^3(c+d x)\right )+2 a \cos ^3(c+d x) \left (a \left (a^2+9 b^2\right ) \cot (c+d x)+6 b \left (a^2+b^2\right ) (\log (\cos (c+d x))-\log (\sin (c+d x)))\right )-b^4 \sin (c+d x)-2 b^2 \left (9 a^2+b^2\right ) \cos ^2(c+d x) \sin (c+d x)\right ) \tan ^3(c+d x)}{3 d (a \cos (c+d x)+b \sin (c+d x))^4} \]
-1/3*((b + a*Cot[c + d*x])^4*Sin[c + d*x]*(Cos[c + d*x]*(-6*a*b^3 + 6*a^3* b*Cot[c + d*x]^2 + a^4*Cot[c + d*x]^3) + 2*a*Cos[c + d*x]^3*(a*(a^2 + 9*b^ 2)*Cot[c + d*x] + 6*b*(a^2 + b^2)*(Log[Cos[c + d*x]] - Log[Sin[c + d*x]])) - b^4*Sin[c + d*x] - 2*b^2*(9*a^2 + b^2)*Cos[c + d*x]^2*Sin[c + d*x])*Tan [c + d*x]^3)/(d*(a*Cos[c + d*x] + b*Sin[c + d*x])^4)
Time = 0.32 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.91, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3999, 522, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^4(c+d x) (a+b \tan (c+d x))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \tan (c+d x))^4}{\sin (c+d x)^4}dx\) |
\(\Big \downarrow \) 3999 |
\(\displaystyle \frac {b \int \frac {\cot ^4(c+d x) (a+b \tan (c+d x))^4 \left (\tan ^2(c+d x) b^2+b^2\right )}{b^4}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 522 |
\(\displaystyle \frac {b \int \left (\frac {a^4 \cot ^4(c+d x)}{b^2}+\frac {4 a^3 \cot ^3(c+d x)}{b}+\frac {\left (a^4+6 b^2 a^2\right ) \cot ^2(c+d x)}{b^2}+\frac {4 a \left (a^2+b^2\right ) \cot (c+d x)}{b}+b^2 \tan ^2(c+d x)+6 a^2 \left (\frac {b^2}{6 a^2}+1\right )+4 a b \tan (c+d x)\right )d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \left (-\frac {a^4 \cot ^3(c+d x)}{3 b}-2 a^3 \cot ^2(c+d x)+b \left (6 a^2+b^2\right ) \tan (c+d x)-\frac {a^2 \left (a^2+6 b^2\right ) \cot (c+d x)}{b}+4 a \left (a^2+b^2\right ) \log (b \tan (c+d x))+2 a b^2 \tan ^2(c+d x)+\frac {1}{3} b^3 \tan ^3(c+d x)\right )}{d}\) |
(b*(-((a^2*(a^2 + 6*b^2)*Cot[c + d*x])/b) - 2*a^3*Cot[c + d*x]^2 - (a^4*Co t[c + d*x]^3)/(3*b) + 4*a*(a^2 + b^2)*Log[b*Tan[c + d*x]] + b*(6*a^2 + b^2 )*Tan[c + d*x] + 2*a*b^2*Tan[c + d*x]^2 + (b^3*Tan[c + d*x]^3)/3))/d
3.1.47.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. ), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[b/f Subst[Int[x^m*((a + x)^n/(b^2 + x^2)^(m/2 + 1)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/2]
Time = 11.77 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.97
method | result | size |
derivativedivides | \(\frac {-b^{4} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+4 a \,b^{3} \left (\frac {1}{2 \cos \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+6 a^{2} b^{2} \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+4 a^{3} b \left (-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a^{4} \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (d x +c \right )\right )}{3}\right ) \cot \left (d x +c \right )}{d}\) | \(133\) |
default | \(\frac {-b^{4} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+4 a \,b^{3} \left (\frac {1}{2 \cos \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+6 a^{2} b^{2} \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+4 a^{3} b \left (-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a^{4} \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (d x +c \right )\right )}{3}\right ) \cot \left (d x +c \right )}{d}\) | \(133\) |
risch | \(\frac {8 a^{3} b \,{\mathrm e}^{10 i \left (d x +c \right )}+8 a \,b^{3} {\mathrm e}^{10 i \left (d x +c \right )}-\frac {32 i b^{4} {\mathrm e}^{6 i \left (d x +c \right )}}{3}-\frac {4 i b^{4}}{3}-24 i a^{2} b^{2}+16 a^{3} b \,{\mathrm e}^{8 i \left (d x +c \right )}-16 a \,b^{3} {\mathrm e}^{8 i \left (d x +c \right )}+8 i b^{4} {\mathrm e}^{4 i \left (d x +c \right )}+8 i a^{4} {\mathrm e}^{4 i \left (d x +c \right )}+\frac {32 i a^{4} {\mathrm e}^{6 i \left (d x +c \right )}}{3}+4 i b^{4} {\mathrm e}^{8 i \left (d x +c \right )}+48 i a^{2} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-16 a^{3} b \,{\mathrm e}^{4 i \left (d x +c \right )}+16 a \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-8 a^{3} b \,{\mathrm e}^{2 i \left (d x +c \right )}-8 a \,b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-24 i a^{2} b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+4 i a^{4} {\mathrm e}^{8 i \left (d x +c \right )}-\frac {4 i a^{4}}{3}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}+\frac {4 a^{3} b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {4 a \,b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}-\frac {4 b \,a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}-\frac {4 b^{3} a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(385\) |
1/d*(-b^4*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+4*a*b^3*(1/2/cos(d*x+c)^2+ln( tan(d*x+c)))+6*a^2*b^2*(1/sin(d*x+c)/cos(d*x+c)-2*cot(d*x+c))+4*a^3*b*(-1/ 2/sin(d*x+c)^2+ln(tan(d*x+c)))+a^4*(-2/3-1/3*csc(d*x+c)^2)*cot(d*x+c))
Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (133) = 266\).
Time = 0.28 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.95 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^4 \, dx=-\frac {2 \, {\left (a^{4} + 18 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{6} + 18 \, a^{2} b^{2} \cos \left (d x + c\right )^{2} - 3 \, {\left (a^{4} + 18 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} + b^{4} + 6 \, {\left ({\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{5} - {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - 6 \, {\left ({\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{5} - {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4}\right ) \sin \left (d x + c\right ) + 6 \, {\left (a b^{3} \cos \left (d x + c\right ) - {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{5} - d \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )} \]
-1/3*(2*(a^4 + 18*a^2*b^2 + b^4)*cos(d*x + c)^6 + 18*a^2*b^2*cos(d*x + c)^ 2 - 3*(a^4 + 18*a^2*b^2 + b^4)*cos(d*x + c)^4 + b^4 + 6*((a^3*b + a*b^3)*c os(d*x + c)^5 - (a^3*b + a*b^3)*cos(d*x + c)^3)*log(cos(d*x + c)^2)*sin(d* x + c) - 6*((a^3*b + a*b^3)*cos(d*x + c)^5 - (a^3*b + a*b^3)*cos(d*x + c)^ 3)*log(-1/4*cos(d*x + c)^2 + 1/4)*sin(d*x + c) + 6*(a*b^3*cos(d*x + c) - ( a^3*b + a*b^3)*cos(d*x + c)^3)*sin(d*x + c))/((d*cos(d*x + c)^5 - d*cos(d* x + c)^3)*sin(d*x + c))
\[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^4 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{4} \csc ^{4}{\left (c + d x \right )}\, dx \]
Time = 0.36 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.88 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {b^{4} \tan \left (d x + c\right )^{3} + 6 \, a b^{3} \tan \left (d x + c\right )^{2} + 12 \, {\left (a^{3} b + a b^{3}\right )} \log \left (\tan \left (d x + c\right )\right ) + 3 \, {\left (6 \, a^{2} b^{2} + b^{4}\right )} \tan \left (d x + c\right ) - \frac {6 \, a^{3} b \tan \left (d x + c\right ) + a^{4} + 3 \, {\left (a^{4} + 6 \, a^{2} b^{2}\right )} \tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{3}}}{3 \, d} \]
1/3*(b^4*tan(d*x + c)^3 + 6*a*b^3*tan(d*x + c)^2 + 12*(a^3*b + a*b^3)*log( tan(d*x + c)) + 3*(6*a^2*b^2 + b^4)*tan(d*x + c) - (6*a^3*b*tan(d*x + c) + a^4 + 3*(a^4 + 6*a^2*b^2)*tan(d*x + c)^2)/tan(d*x + c)^3)/d
Time = 1.16 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.18 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {b^{4} \tan \left (d x + c\right )^{3} + 6 \, a b^{3} \tan \left (d x + c\right )^{2} + 18 \, a^{2} b^{2} \tan \left (d x + c\right ) + 3 \, b^{4} \tan \left (d x + c\right ) + 12 \, {\left (a^{3} b + a b^{3}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) - \frac {22 \, a^{3} b \tan \left (d x + c\right )^{3} + 22 \, a b^{3} \tan \left (d x + c\right )^{3} + 3 \, a^{4} \tan \left (d x + c\right )^{2} + 18 \, a^{2} b^{2} \tan \left (d x + c\right )^{2} + 6 \, a^{3} b \tan \left (d x + c\right ) + a^{4}}{\tan \left (d x + c\right )^{3}}}{3 \, d} \]
1/3*(b^4*tan(d*x + c)^3 + 6*a*b^3*tan(d*x + c)^2 + 18*a^2*b^2*tan(d*x + c) + 3*b^4*tan(d*x + c) + 12*(a^3*b + a*b^3)*log(abs(tan(d*x + c))) - (22*a^ 3*b*tan(d*x + c)^3 + 22*a*b^3*tan(d*x + c)^3 + 3*a^4*tan(d*x + c)^2 + 18*a ^2*b^2*tan(d*x + c)^2 + 6*a^3*b*tan(d*x + c) + a^4)/tan(d*x + c)^3)/d
Time = 4.78 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.96 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (4\,a^3\,b+4\,a\,b^3\right )}{d}-\frac {{\mathrm {cot}\left (c+d\,x\right )}^3\,\left ({\mathrm {tan}\left (c+d\,x\right )}^2\,\left (a^4+6\,a^2\,b^2\right )+\frac {a^4}{3}+2\,a^3\,b\,\mathrm {tan}\left (c+d\,x\right )\right )}{d}+\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (6\,a^2\,b^2+b^4\right )}{d}+\frac {b^4\,{\mathrm {tan}\left (c+d\,x\right )}^3}{3\,d}+\frac {2\,a\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^2}{d} \]